package com.tianyi.sfzy1.service;


import com.tianyi.sfzy1.domain.Lessonlist;
import com.tianyi.sfzy1.mapper.LessonlistMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LessonlistService {

    @Autowired
    private LessonlistMapper lessonlistMapper;

//    通过课程id查询所有列表
    public List<Lessonlist> findLesson(int courseId){
        return lessonlistMapper.findLesson(courseId);
    }

//    点击购买根据课程id改变列表购买状态
    public int update(int courseId){
        return lessonlistMapper.updateStatus(courseId);
    }
}
